package com.xjtu.platform.user.checker.impl;


/**
 * @创建人 mby381
 * @创建时间 2021-12-17
 * @描述
 */


import com.xjtu.platform.user.checker.CheckerService;
import com.xjtu.platform.user.checker.ReqDto;
import com.xjtu.platform.user.checker.dao.CheckerDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;


@Service
@Transactional
public class CheckerServiceImpl implements CheckerService {

    @Resource
    private CheckerDao cdao;


    @Override
    public List<ReqDto> findAllRecord() {

        try{
            List<ReqDto> list = cdao.selectAllRecord();
            return list;
        }catch (Exception e){e.printStackTrace();}
        return null;
    }

    @Override
    public void checkUpdReq(ReqDto dto) {
        System.out.println("开始更改");
        System.out.println("更改目标: "+dto.getRequest_id());
        cdao.updSelectedReqStage(dto);
    }

    @Override
    public void refuseReq(String id) {
        cdao.refuseReq(id);
    }


}
